<?php
	function twitter_init()
	{
		global $configuration;

		return(new Twitter($configuration['login'], $configuration['password']));
	}

	function twitter_exception(Twitter $twitter, $method, Array $args = Array())
	{
		if(!method_exists($twitter, $method))
		{
			return;
		}

		try
		{
			$retval = call_user_func_array(Array($twitter, $method), $args);
		}
		catch(Exception $e)
		{
			return($e);
		}

		return($retval);
	}
?>